<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/

Route::get('/', function () {
    return view('welcome');
});

//创建路由组
 Route::group(['middleware'=>'login'],function(){

//后台主页路由
Route::get('/admin',function(){
	return view('admin.index.index');
});


//商品列表路由
Route::controller('/admin/cate','CateController');

//后台相册路由
Route::controller('/admin/photo','PhotoController');

//后台用户管理
Route::controller('/admin/user','UserController');
//后台商品管理
Route::controller('/admin/goods','GoodsController');
//后台日记管理
Route::controller('/admin/day','DayController');
 });
 
//后台登陆
Route::controller('/admin/login','LoginController');
//前台登陆
Route::controller('/home/login','QianLoginController');

//前台主页路由
Route::get('/home',function(){
	// 查询信息
	 $peizhi = DB::table('webcon')->first();
     session(['peizhi'=>$peizhi]);
	return view('home.index.index');
});
//前台相册路由
Route::controller('/home/photo','HomeController');
// 前台日记路由
Route::controller('/home/day','DayController');
// 后台友链
Route::controller('/admin/frilk','FrilkController');

//后台网站配置
Route::controller('/admin/webconfig','WebconfigController');


Route::get('/home/day/{tmp}', 'KitController@captcha');

// 前台列表页
Route::controller('/home/liebiao','LiebiaoController');

// 前台详情页
Route::controller('/home/xiangqing','XiangqingController');

// 前台首页
Route::controller('/home/index','IndexController');

// 前台短评
Route::controller('/home/comment','CommentController');

// 订单后台
Route::controller('/admin/order','ListController');

//个人订单详情后台
Route::controller('/admin/gwxq','GrController');

// 个人订单详情前台
Route::controller('/home/grdd','GrddController');

// 支付清单
Route::controller('/admin/zhifu','ZhifuController');

// 前台订单页面
Route::controller('/home/dingdan','DingdController');

//广告路由
Route::controller('/admin/adver','MentController');

//购物车显示
Route::controller('/home/car','CarController');


// 前台短评
Route::controller('/home/comment','CommentController');

//前台个人中心
Route::controller('/home/user','UserController');



